<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>打零工企业web</title>
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="css/default.css"/>
    <link rel="stylesheet" href="css/common.css"/>
    <link rel="stylesheet" href="js/datepicker/jquery-ui.css"/>
    <link rel="stylesheet" href="js/pagination/paging.css" />
    <link rel="stylesheet" href="js/calendar/calendar.css"/>
    <link rel="stylesheet" href="./css/linggong.css"/>
    <link rel="stylesheet" href="css/news.css"/>
</head>
<body>
<div>
    <div class="header">
        <div class="container">
            <div class="logo">
                <img src="images/logo.png" alt="">
            </div>
            <div class="news">
                <ul>
                    <li>打零工互联网 <a class="cursor" href="javascript:void(0);" data-target='news' id="news">消息(<b
                            class="redColor">10</b>)</a></li>
                    <li><span class="cursor" onclick="logout()">退出</span></li>
                </ul>
            </div>
        </div>
    </div>
    <div class="contain">
        <div class="container">
            <div class="nav ">
                <ul>
                    <li class="nav_index_li">
                        <div>
                            <img src="images/icon_18.png" alt=""><a href="javascript:void(0);" data-target="index">首页</a>
                        </div>
                    </li>
                    <li>
                        <div><img src="images/icon_01.png" alt="">零工管理</div>
                        <ul class="nav_child nav_child_guanli">
                            <li><a href="javascript:void(0);" data-target="fabulinggong">发布零工</a></li>
                            <li><a href="javascript:void(0);" data-target="quanbulinggong">全部零工</a></li>
                            <li><a href="javascript:void(0);" data-target="jinxingzhong">进行中</a></li>
                            <li><a href="javascript:void(0);" data-target="yiwancheng">已完成</a></li>
                            <li><a href="javascript:void(0);" data-target="yibohui">已驳回</a></li>
                        </ul>
                    </li>
                    <li>
                        <div><img src="images/icon_02.png" alt="">雇员管理</div>
                        <ul class="nav_child nav_child_employee">
                            <li><a href="javascript:void(0);" data-target="employeeClerk">公司职员</a></li>
                        </ul>
                    </li>
                    <li>
                        <div><img src="images/icon_02.png" alt="">客户管理</div>
                        <ul class="nav_child nav_child_customer">
                            <li><a href="javascript:void(0);" data-target="lowerAgent">下级代理商</a></li>
                            <li><a href="javascript:void(0);" data-target="customerManage">我的客户</a></li>
                        </ul>
                    </li>
                    <li>
                        <div><img src="images/icon_01.png" alt="">零工市场</div>
                        <ul class="nav_child nav_child_guanli">
                            <li><a href="javascript:void(0);" data-target="linggongshichang-zhuandan">我要转单</a></li>
                            <li><a href="javascript:void(0);" data-target="linggongshichang-jiedan">我要接单</a></li>
                        </ul>
                    </li>
                    <li>
                        <div><img src="images/icon_04.png" alt="">账户管理</div>
                        <ul class="nav_child nav_child_info">
                            <li><a href="javascript:void(0);" data-target="companyInfo">企业资料</a></li>
                            <li><a href="javascript:void(0);" data-target="wodeqianbao">我的钱包</a></li>
                            <!--<li><a href="javascript:void(0);" data-target="myEarnings">我的收益(代)</a></li>-->
                            <!--<li><a href="javascript:void(0);" data-target="forInvoice">发票管理</a></li>-->
                            <li><a href="javascript:void(0);" data-target="securitySetting">安全设置</a></li>
                        </ul>
                    </li>
                </ul>
            </div>
            <div class="right_content">
                <div id="loadingPage" class="dlg-row clear-padding">
                    <img class="dlg-no-list-img" src="./images/loading.gif" style="margin-top: 200px;"/>
                </div>
                <div id="rightPart"></div>
            </div>
        </div>
    </div>
    <div class="footer">
        <div class="container">
            <div class="logo">
                <img src="images/logo_1.png" alt="">
            </div>
            <ul>
                <li>Copyright&copy;2017 打零工 沪ICP备156006046号-1</li>
                <li>公司地址：上海市普陀区真北路958号天地科技广场一号楼7楼</li>
            </ul>
            <ul>
                <li>客服邮箱：service@dalinggong.com</li>
                <li>业务合作邮箱：mkt@dalinggong.com楼</li>
            </ul>
            <ul>
                <li>客服热线：400-750-8585 <span>(周一至周五9：00-18：00)</span></li>
            </ul>
        </div>
    </div>
</div>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script src="./js/datepicker/jquery-ui.js"></script>
<script type="text/javascript" src="http://webapi.amap.com/maps?v=1.3&key=3c91338e8bc1bd348dc55fa560453e42"></script>
<!--上传图片-->
<script type="text/javascript" src="js/lib/crypto1/crypto/crypto.js"></script>
<script type="text/javascript" src="js/lib/crypto1/hmac/hmac.js"></script>
<script type="text/javascript" src="js/lib/crypto1/sha1/sha1.js"></script>
<script type="text/javascript" src="js/lib/crypto1/md5/md5.js"></script>
<script type="text/javascript" src="js/lib/base64.js"></script>
<script type="text/javascript" src="js/lib/plupload-2.1.2/js/plupload.full.min.js"></script>
<script type="text/javascript" src="js/upload.js"></script>
<script src="./js/calendar/calendar.js"></script>
<script src="./js/pagination/paging.js"></script>
<script src="js/template/template.js"></script>
<script src="js/public.js"></script>

<script>
    // function jumpPage(pageUrl, id) {
    //     $.get(pageUrl,function (data) {
    //         $("#" + id).html("").append(data);
    //     })
    // }
    var userid = window.localStorage["userid"];
    var access_token = window.localStorage["access_token"];
    var entid = window.localStorage["entid"];
    var isagent=window.localStorage["isagent"]
    $(function () {
        var locationURL = location.hash.replace(/\#\//, '');
        if (!locationURL) {
            jumpPage('index/index.html', 'rightPart')
        } else {
            jumpPage('./' + locationURL + '.html', 'rightPart');
        };
        $(".nav_title ul li>a").css("color", "#fff");
        $(".cursor").css("cursor", "pointer");
        $(".nav_bar li").css("cursor", "pointer");
        // jumpPage("index/index.html", "rightPart");
        $("#news").click(function () {
            var target = $(this).attr('data-target');
            location.replace("#/index/" + target);
            jumpPage('./index/' + target + ".html", "rightPart");
        });

        $(".nav_index_li").click(function () {
            var target = $(this).find('a').attr('data-target');
            location.replace("#/index/" + target);
            jumpPage('./index/' + target + ".html", "rightPart");
        });
        $(".nav_child li").click(function () {
            // $(this).css("font-weight", "600").siblings().css("font-weight", "500");
            $(".nav_child li").find("ul").hide();
            $(this).find("ul").show();
            $(".nav_child li").removeClass("active");
            $(this).addClass("active");
        });
        $(".nav_child_guanli li").click(function () {
            var target = $(this).find('a').attr('data-target');
            location.replace("#/linggongguanli/" + target);
            jumpPage('./linggongguanli/' + target + ".html", "rightPart");
        });

        $(".nav_child_info li").click(function () {
            var target = $(this).find('a').attr('data-target');
            location.replace("#/account/" + target);
            jumpPage('./account/' + target + ".html", "rightPart");
        });

	     $(".nav_child_customer li").click(function(){
	     	var target = $(this).find('a').attr('data-target');
	     	location.replace("#/customer/"+target);
	        jumpPage('./customer/'+target + ".html", "rightPart");
	     });

        $(".nav_child_employee li").click(function () {
            var target = $(this).find('a').attr('data-target');
            location.replace("#/employee/" + target);
            jumpPage('./employee/' + target + ".html", "rightPart");
        });
    })

    function logout(){

        $.ajax({
            url: url + '/auth/logout',
            type: 'post',
            dataType: 'json',
            data: "access_token="+access_token,
            cache: 'false',
            success: function (jsData) {
                console.log("退出登录",jsData)

                localStorage.removeItem('userid');
                localStorage.removeItem('isagent');
                localStorage.removeItem('access_token');
                localStorage.removeItem('entid');
                localStorage.removeItem('phone');
                localStorage.removeItem('password');
                window.location.href = 'login.html';
            }
        })
    }
</script>
</body>
</html>